# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

pkgname=rarian
pkgver=0.8.1
pkgrel=1
pkgdesc="Documentation meta-data library, designed as a replacement for Scrollkeeper."
arch=('i686' 'x86_64')
url="http://rarian.freedesktop.org/"
license=('GPL')
depends=('gcc-libs')
makedepends=('libxslt-python')
source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.8/${pkgname}-${pkgver}.tar.bz2
        user-segfault.patch
        msysize.patch
        0.8-no-undefined.patch
        0.8.1-file-uri.patch)
md5sums=('75091185e13da67a0ff4279de1757b94'
         '457e9827197009cfa360911fe49a5ad7'
         '6c088bee3cf5936fe3bc8960f27aceca'
         'a8a2143fa7a09e92169cf58b96d8f525'
         '802b0425b56cae5b175534dc0fd6f0c7')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -Np0 -i ${srcdir}/user-segfault.patch
  patch -Np1 -i ${srcdir}/msysize.patch
  patch -Np2 -i ${srcdir}/0.8-no-undefined.patch
  patch -Np2 -i ${srcdir}/0.8.1-file-uri.patch

  autoreconf -fi
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr \
      --sysconfdir=/etc \
      --localstatedir=/var \
      --disable-static
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
